From: Jonas Dreßler Date: Sun, 17 Nov 2019 13:35:42 +0000 (+0100) Subject: messageList: Don't include message actor in error message X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~393 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=55362aed3d42e02d3b8aaf2ff79cdcae79ce2b50;p=gnome-shell.git messageList: Don't include message actor in error message Because the message actor could also be undefined or a already deallocated ClutterActor, we sometimes fail to show the error message and get an error from Gjs instead. So make sure we always log the proper error message and just leave out the actor. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/833 --- diff --git a/js/ui/messageList.js b/js/ui/messageList.js index 08bcbb444..3188d0377 100644 --- a/js/ui/messageList.js +++ b/js/ui/messageList.js @@ -642,7 +642,7 @@ var MessageListSection = GObject.registerClass({ moveMessage(message, index, animate) { if (!this._messages.includes(message)) - throw new Error(`Impossible to move the untracked message ${message}`); + throw new Error(`Impossible to move untracked message`); let listItem = message.get_parent(); @@ -671,7 +671,7 @@ var MessageListSection = GObject.registerClass({ removeMessage(message, animate) { if (!this._messages.includes(message)) - throw new Error(`Impossible to remove the untracked message ${message}`); + throw new Error(`Impossible to remove untracked message`); let listItem = message.get_parent(); listItem._connectionsIds.forEach(id => message.disconnect(id));